/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.ipti.br.tag.configuration.stLuzia;

import org.ipti.br.tag.configuration.qualifiers.Responsible;
import org.ipti.br.tag.dao.PersonageFacade;
import org.ipti.br.tag.entity.Personage;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Produces;
import javax.inject.Inject;

/**
 *
 * @author luancorumba
 */
@ApplicationScoped
public class PersonageFactory {
    
    @Inject
    private PersonageFacade personageFacade;
    
    @Produces
    @Responsible
    public Personage findBoss(){
        Personage personage = personageFacade.find(1266550109L);
//        for(Personage p : personageFacade.getPersonageChildren(1266550109L)){
//            if(p.getOrganization().equals(organization)){
//                personage = p;
//                System.out.println("FOI PERSONAGE");
//            }
//        }
//        Org = -1439496138
//        Personage = 1266550109
        return personage;
    }
    
}
